/*

 */
import request from '@/utils/request'


/**查询商品SKU耗材列表-商品类型不分页 */
export function listNoPageByGoods() {
  return request({
    url: `/distribution/skuConsumable/listNoPageByGoods`,
  })
}

/**更新图片 */
export function saveSkuBindImages(data) {
  return request({
    url: `/system/oss/saveSkuBindImages`,
    method: 'POST',
    data
  })
}


/**查询商品SKU耗材列表-商品类型不分页 */
export function listNoPageByOrder() {
  return request({
    url: `/distribution/skuConsumable/listNoPageByOrder`,
  })
}



/**查询商品SKU耗材列表 */
export function getSkuConsumableList() {
  return request({
    url: `/distribution/skuConsumable/list`,
  })
}

// distribution: skuConsumablePurchase: deleteSkuCes
/**删除SKU耗材 */
export function deleteSkuCes(cesId, skuId) {
  return request({
    url: `/distribution/skuConsumablePurchase/deleteSkuCes/${cesId}/${skuId}`,
    method: 'delete',
  })
}
/**SKU绑定耗材 */
export function bingSkuCes(data) {
  return request({
    url: '/distribution/skuConsumablePurchase/bingSkuCes',
    method: 'POST',
    data
  })
}

/**批量上传包材图片 */
export function deleteSkuBindImg(imgId) {
  return request({
    url: `/distribution/skuDistributor/deleteSkuBindImg/${imgId}`,
    method: 'delete',
  })
}

/**批量上传包材图片 */
export function uploadSkuBindImages(data,) {
  return request({
    url: `/system/oss/uploadSkuBindImages`,
    method: 'post',
    data,
    headers: { 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundary7TMYhSONfkAM2z3a', 'timeout': 20000 }
  })
}

/**修改供应商包材信息 */
export function updateSkuDistributorPackageMaterial(data) {
  return request({
    url: '/distribution/skuDistributor/updateSkuDistributorPackageMaterial',
    method: 'post',
    data
  })
}


/**获取供应商包材信 */
export function getInfo(skuId) {
  return request({
    url: `/distribution/skuDistributor/getSkuDistributorPackageMaterial?skuId=${skuId}`,
  })
}
